#include <algorithm>
#include <iostream>
#include <cstring>
#include <vector>
#include <cmath>
using namespace std;
const int N=510;
struct enode{
	int x, y;
}d[N];
struct node{
	int x,y;
	double w;
	bool operator<(const node& p1)
	{
		return w<p1.w;
	}
};
int f[N];
vector<node> edge;
int n,k;
int Find(int x)
{
	if(f[x]!=x)
	{
		f[x]=Find(f[x]);
	}
	return f[x];
}
double get_dist(enode&p1,enode& p2){
	double dx=p1.x-p2.x;
	double dy=p1.y-p2.y;
	return sqrt(dx*dx+dy*dy);
}

int main()
{
	cin>>n>>k;
	for(int i=1;i<=n;i++)
		cin>>d[i].x>>d[i].y;
	
	for(int i=0;i<=n;i++) 
		f[i]=i;
	
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<i;j++)
		{
			if(i==j)
				continue;
				edge.push_back({i,j,get_dist(d[i],d[j])});
		}
	}
	
	sort(edge.begin(),edge.end());
	int cnt=n;
	double ret=0;
	for(int i=0;i<edge.size();i++)
	{
		if(cnt<=k)
			break;
		int x=Find(edge[i].x),y=Find(edge[i].y);
		if(x!=y)
		{
			f[x]=y;
			cnt--;
			ret=edge[i].w;
		}
	}
	printf("%.2lf",ret);
	
	return 0;
}
